package com;

import org.smartboot.http.HttpBootstrap;
import org.smartboot.http.server.handle.HttpRouteHandle;

public class Http {

    public static void main(String[] args) {

        // 1. 实例化路由Handle
        HttpNginxRouteHandle routeHandle = new HttpNginxRouteHandle();

        // 2. 指定路由规则以及请求的处理实现
        routeHandle.route("/**", "https://demo.ruoyi.vip/login/");

        // 3. 启动服务
        HttpBootstrap bootstrap = new HttpBootstrap();
        bootstrap.pipeline().next(routeHandle);
        bootstrap.setPort(9080).start();
    }
}
